<?php
	# education.php
	# Education page of the portfolio 
	# 2013-May

    // Set current page id as a session variable
    $_SESSION['currId'] = 'Education';
?>

<!-- Formation / Education -->
<span id="subject"><?php print $txt_education_full; ?></span>
<br />
<?php
	$query_edus = "SELECT edu.edu_title_fr, edu.edu_title_en, edu.edu_school, edu.edu_location, edu.edu_startdate, edu.edu_enddate, edut.name_fr, edut.name_en
					FROM education edu
					LEFT JOIN education_types edut ON edut.id = edu.edu_typeid
					ORDER BY edu.id ASC";
					
	$result_edus = mysql_query($query_edus);
	
	# Number of referencies
	$num_edus = mysql_num_rows($result_edus);

    # Get the current language
    if (!isset($_COOKIE['lang'])){
        $currLang = 'fr';
    }
    else
        $currLang = $_COOKIE['lang'];
?>

<table class="tabPanel">
	<?php
		while (false !== ($row_edu = mysql_fetch_array($result_edus)))
		{
			print '<tr>';
				print '<td>';
					print '<div class="panel style-8">';
						print '<div>';
							print '<h5>' . utf8_encode($row_edu['name_' . $currLang]) . '</h5>';
							print '<p>';
                                print '<b>' . utf8_encode($row_edu['edu_title_' . $currLang]) . '</b><br/>';
                                print utf8_encode($row_edu['edu_school']) . '<br/>';
                                print utf8_encode($row_edu['edu_location']);
                                print '<br>';
								print format_date1(strtotime($row_edu['edu_startdate'])) . ' - ' 
									. format_date1(strtotime($row_edu['edu_enddate'])) . '<br /><br />';
							print '</p>';
						print '</div>';
					print '</div>';
				print '</td>';
			print '</tr>';
		}
	?>
</table>
